//
//  UIView+SLSDK.h
//  SLTool
//
//  Created by SongLian on 16/7/10.
//  Copyright © 2016年 SongLian. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (SLSDK)

@property (assign, nonatomic) CGFloat sl_x;
@property (assign, nonatomic) CGFloat sl_y;
@property (assign, nonatomic) CGPoint sl_origin;
@property (assign, nonatomic) CGFloat sl_width;
@property (assign, nonatomic) CGFloat sl_height;
@property (assign, nonatomic) CGSize  sl_size;

@property (nonatomic, assign) CGFloat sl_centerX;
@property (nonatomic, assign) CGFloat sl_centerY;

@property (assign, nonatomic) CGFloat sl_maxX;
@property (assign, nonatomic) CGFloat sl_maxY;

@property (assign, nonatomic, readonly) CGFloat sl_halfWidth;
@property (assign, nonatomic, readonly) CGFloat sl_halfHeight;

@property (nonatomic, readonly) UIViewController *sl_viewController;

#pragma mark - --- Fillet ---
- (void)sl_filletWithHalfHeight;
- (void)sl_filletWithHalfWidth;
- (void)sl_filletWithRadius:(CGFloat)radius;

- (void)sl_addSubviews:(NSArray *)subviews;

+ (UIView *)sl_viewWithFrame:(CGRect)frame backgroudColor:(UIColor *)backgroundColor;

+ (UIView *)sl_viewWithNibName:(NSString *)nibName;

+ (UIView *)sl_starsViewWithRanking:(CGFloat)ranking origin:(CGPoint)origin;

@end
